<template>
  <!--  菜单栏  -->
  <!--  default-openeds参数为默认展开：default-openeds="['1', '2']"  -->
  <el-menu :default-openeds="['2']"
           style="min-height: 100%; overflow-x: hidden; white-space: nowrap;"
           background-color="rgb(45,80,140)"
           text-color="#fff"
           active-text-color="#ffd04b"
           :collapse-transition="false"
           :collapse="isCollapse"
           router
  >
    <!--           background-color="rgb(48, 65, 86)"-->

    <!--  标题部分  -->
    <div style="height: 60px; line-height: 60px; text-align: center">
      <!--  左上角Logo和标题  -->
      <img src="../resources/MyBatis-Plus.jpg" alt="" style="width: 20px; position: relative; top: 5px; margin-right: 5px">
      <b style="color: white" v-show="logoTextShow">进销存管理系统</b>
    </div>

    <!--  首页  -->
    <el-menu-item index="/home">
      <i class="el-icon-s-home"></i>
      <span slot="title">首页</span>
    </el-menu-item>
    <!--  第二大模块（示例）  -->
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-user-solid"></i>
        <span slot="title">系统管理</span>
      </template>
      <el-menu-item-group>
        <template slot="title">用户操作</template>
        <el-menu-item index="/user"><i class="el-icon-user"></i>用户管理</el-menu-item>
      </el-menu-item-group>
        <el-menu-item-group title="系统操作">
          <el-menu-item index="/setting"><i class="el-icon-setting"></i>系统设置</el-menu-item>
        </el-menu-item-group>
        <el-submenu>
          <template slot="title"><i class="el-icon-data-board"></i>系统监控</template>
          <el-menu-item index="/network_message"><i class="el-icon-data-line"></i>网络信息</el-menu-item>
          <el-menu-item index="/system_message"><i class="el-icon-data-analysis"></i>系统信息</el-menu-item>
          <el-menu-item index="/operating_state"><i class="el-icon-pie-chart"></i>图表分析</el-menu-item>
        </el-submenu>
    </el-submenu>
    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">功能管理</span>
      </template>
      <el-menu-item-group>
        <template slot="title">库存</template>
        <el-menu-item index="/commodity"><i class="el-icon-s-order"></i>商品信息管理</el-menu-item>
        <el-menu-item index="/inventory"><i class="el-icon-s-release"></i>库存管理</el-menu-item>
      </el-menu-item-group>
      <el-menu-item-group title="供销">
        <el-menu-item index="/supplier"><i class="el-icon-s-claim"></i>供应商管理</el-menu-item>
      </el-menu-item-group>
      <el-submenu>
        <template slot="title"><i class="el-icon-s-finance"></i>销售管理</template>
        <el-menu-item index="/order"><i class="el-icon-s-marketing"></i>订单管理</el-menu-item>
      </el-submenu>
    </el-submenu>
    <el-menu-item index="/map">
      <i class="el-icon-guide"></i>
      <span slot="title">高德地图集成</span>
    </el-menu-item>
    <el-menu-item index="/donate">
      <i class="el-icon-hot-water"></i>
      <span slot="title">请作者喝杯Java</span>
    </el-menu-item>
  </el-menu>

</template>

<script>

export default {
  name: "Aside",
  props: {
    isCollapse: Boolean,
    logoTextShow: Boolean
  },
  methods: {
    handleSelect(index) {
    },
  }
}
</script>

<style scoped>

</style>